#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QPixmap>
#include <QTcpSocket>
#include <QHostAddress>
#include <QDebug>

#define TH   8
#define registered  1
#define login       2
#define  Set        3
#define  history    4
#define  authorization  5
//#define  deletemeg      6

namespace Ui {
class Widget;

}
typedef struct msg
{
    int type;
    char name[64];
    char data[512];

}msg;


class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = 0);
    ~Widget();

private slots:
    void connctedSlot();
    void connctedSlot2();
    void slotRecvData();
    void on_addcard_btn_clicked();
    void on_delete_card_btn_clicked();

    void on_pushButton_6_clicked();

    void on_login_btn_clicked();

    void on_register_btn_clicked();

    void on_querenregister_btn_clicked();

    void on_fanhuilogin_btn_clicked();
    void  checkAccessSlot();

    void on_historyfanhui_btn_clicked();

    void on_pushButton_2_clicked();

    void on_his_queding_btn_clicked();

    void on_set_ok_btn_clicked();
    void  showpicture();
    //void  recvImgs();
    void on_pushButton_4_clicked();

private:
    Ui::Widget *ui;
    QPixmap pix;
    QTcpSocket *cli_soc;
    QTcpSocket *camsoc;
    QHostAddress hostAddress;
     QByteArray imageData;

};

#endif // WIDGET_H
